package com.fw.system.admin.service.impl;

import java.util.List;
import com.fw.common.IdXD;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.fw.system.admin.mapper.TbGunsUserMapper;
import com.fw.system.admin.domain.TbGunsUser;
import com.fw.system.admin.service.ITbGunsUserService;
import com.fw.utils.DateUtils;

/**
 * 个人装备背包Service业务层处理
 * 
 * @author xxx
 * @date 2021-12-03
 */
@Service
public class TbGunsUserServiceImpl extends ServiceImpl<TbGunsUserMapper, TbGunsUser> implements ITbGunsUserService
{
    @Autowired
    private TbGunsUserMapper tbGunsUserMapper;

    @Autowired
    private IdXD idXD;

    /**
     * 查询个人装备背包
     * 
     * @param id 个人装备背包ID
     * @return 个人装备背包
     */
    @Override
    public TbGunsUser selectTbGunsUserById(String id)
    {
        return tbGunsUserMapper.selectTbGunsUserById(id);
    }

    /**
     * 查询个人装备背包列表
     * 
     * @param tbGunsUser 个人装备背包
     * @return 个人装备背包
     */
    @Override
    public List<TbGunsUser> selectTbGunsUserList(TbGunsUser tbGunsUser)
    {
        return tbGunsUserMapper.selectTbGunsUserList(tbGunsUser);
    }

    /**
     * 新增个人装备背包
     * 
     * @param tbGunsUser 个人装备背包
     * @return 结果
     */
    @Override
    public int insertTbGunsUser(TbGunsUser tbGunsUser)
    {
        tbGunsUser.setCreateTime(DateUtils.getNowDate());
        tbGunsUser.setId(idXD.nextId());
        return tbGunsUserMapper.insertTbGunsUser(tbGunsUser);
    }

    /**
     * 修改个人装备背包
     * 
     * @param tbGunsUser 个人装备背包
     * @return 结果
     */
    @Override
    public int updateTbGunsUser(TbGunsUser tbGunsUser)
    {
        return tbGunsUserMapper.updateTbGunsUser(tbGunsUser);
    }

    /**
     * 批量删除个人装备背包
     * 
     * @param ids 需要删除的个人装备背包ID
     * @return 结果
     */
    @Override
    public int deleteTbGunsUserByIds(String[] ids)
    {
        return tbGunsUserMapper.deleteTbGunsUserByIds(ids);
    }

    /**
     * 删除个人装备背包信息
     * 
     * @param id 个人装备背包ID
     * @return 结果
     */
    @Override
    public int deleteTbGunsUserById(String id)
    {
        return tbGunsUserMapper.deleteTbGunsUserById(id);
    }
}
